using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Marin.Entities;
using Marin.Repository.Mapping;


namespace Marin.Models
{
    public partial class TransportesMARINContext : DbContext
    {
        static TransportesMARINContext()
        {
            Database.SetInitializer<TransportesMARINContext>(
                //null
                new DropCreateDatabaseIfModelChanges<TransportesMARINContext>()
                //new DropCreateDatabaseAlways<TransportesMARINContext>()
                );
        }

        public TransportesMARINContext()
            : base("Name=TransportesMARINContext")
        {
        }

        public DbSet<Categoria> Categorias { get; set; }
        public DbSet<Cuenta> Cuentas { get; set; }
        public DbSet<DetalleEgreso> DetalleEgresoes { get; set; }
        public DbSet<DetalleIngreso> DetalleIngresoes { get; set; }
        public DbSet<Egreso> Egresos { get; set; }
        public DbSet<Ingreso> Ingresos { get; set; }
        public DbSet<DetalleNewEgreso> detNewEgreso { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CategoriaMap());
            modelBuilder.Configurations.Add(new CuentaMap());
            modelBuilder.Configurations.Add(new DetalleEgresoMap());
            modelBuilder.Configurations.Add(new DetalleIngresoMap());
            modelBuilder.Configurations.Add(new EgresoMap());
            modelBuilder.Configurations.Add(new IngresoMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new DetalleNewEgresoMap());
            
        }
    }
}
